package com.heima.user.controller.v1;

import com.heima.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserRelationDto;
import com.heima.user.service.ApUserFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BehaviorController {
    @Autowired
    private ApUserFollowService followService;

    /**
     * 关注
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/user/user_follow")
    public ResponseResult follow(@RequestBody @Validated UserRelationDto dto) {
        followService.follow(dto);
        return ResponseResult.ok();
    }
}
